package Question.person;

public class Teacher extends Person {
    private String teacherid;
    private String subject;
    public Teacher(){
        }
    public Teacher(String name,int age,String gender,String teacherid,String subject){
        super(name, age, gender);
        this.teacherid=teacherid;
        this.subject=subject;
    }
    public String getTeacherid(){
      return teacherid;
    }
    public void setTeacherid(String teacherid){
        this.teacherid=teacherid;
    }
    public String getSubject(){
        return subject;
    }
    public void setSubject(String subject){
        this.subject=subject;
    }
    public void teach(){
        System.out.println(getName()+"在教"+subject);
    }
}
